Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(pubsub): respect gRPC dial option when PUBSUB_EMULATOR_HOST is set #10040

Merged
merged 6 commits into from
May 6, 2024

Conversation

toga4
Copy link
Contributor

@toga4 toga4 commented Apr 25, 2024

Fixes #10039

This implementation was based on the following implementation of Spanner Client.

// Append emulator options if SPANNER_EMULATOR_HOST has been set.
if emulatorAddr := os.Getenv("SPANNER_EMULATOR_HOST"); emulatorAddr != "" {
emulatorOpts := []option.ClientOption{
option.WithEndpoint(emulatorAddr),
option.WithGRPCDialOption(grpc.WithInsecure()),
option.WithoutAuthentication(),
internaloption.SkipDialSettingsValidation(),
}
opts = append(emulatorOpts, opts...)
}

@toga4 toga4 requested review from shollyman and a team as code owners April 25, 2024 05:31
@product-auto-label product-auto-label bot added the api: pubsub Issues related to the Pub/Sub API. label Apr 25, 2024
@hongalex hongalex added the kokoro:run Add this label to force Kokoro to re-run the tests. label Apr 30, 2024
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Apr 30, 2024
@hongalex hongalex added the kokoro:run Add this label to force Kokoro to re-run the tests. label May 3, 2024
@hongalex hongalex enabled auto-merge (squash) May 3, 2024 18:47
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label May 3, 2024
@hongalex hongalex added the kokoro:run Add this label to force Kokoro to re-run the tests. label May 3, 2024
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label May 3, 2024
@hongalex hongalex added the kokoro:run Add this label to force Kokoro to re-run the tests. label May 6, 2024
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label May 6, 2024
@hongalex hongalex merged commit 95bf6b2 into googleapis:main May 6, 2024
8 checks passed
@toga4 toga4 deleted the pubsub-emulator-grpc-dial-option branch May 6, 2024 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the Pub/Sub API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pubsub: gRPC Dial Option is ignored if PUBSUB_EMULATOR_HOST is set
3 participants